<!DOCTYPE html>
<html lang="en" class="no-js" xmlns:th="http://www.thymeleaf.org"
	xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
	layout:decorator="layout">
<head>
<title>查看订单</title>
</head>
<body>
	<div layout:fragment="content">
		<div class="row">
			<div class="col-md-12">
				<div class="btn-group pull-right">
					<a href="index.html" th:href="@{'/orderInfo/index?viewState='+${viewState}+'&amp;page='+${page}}"
						id="link_cancel" name="link_cancel" class="btn green">返回<i
						class="fa fa-arrow-circle-o-left"></i></a>
				</div>
			</div>
		</div>
		<h3></h3>
		<div class="portlet box blue">
			<div class="portlet-title">
				<div class="caption">订单详情</div>
			</div>
			<div class="portlet-body form">
				<form class="form-horizontal" role="form" th:object="${orderInfo}">
					<div class="form-body">
						<div th:replace="orderInfo/orderBasic"></div>
						<div th:replace="orderInfo/orderOtherInfo"></div>
						<div th:replace="orderInfo/orderConsignee"></div>
						<div th:replace="orderInfo/orderGoods"></div>
					</div>
				</form>
				<br/><br/><br/><br/>
				<div class="row">
					<div class="col-md-12">
                        <div class="col-md-12">
                            <h3 class="form-section">操作</h3>
                        </div>
						<div class="col-md-2"><h5><b>当前可执行操作(<span style="color: #ff0000;" th:text="${orderInfo.isParent?'父订单':'子订单'}"></span>):</b></h5></div>
                        <div class="col-md-10 btn-group" th:if="${orderInfo.isParent}">
                            <!-- 未确认 未付款 未发货 &ndash;&gt;-->
                            <div th:if="${orderInfo.orderStatus.toString() == 'UNCONFIRMED'}" class="col-md-10 bs-example">
                                <a href="#" th:href="@{'/orderInfo/operator/'+${orderInfo.id}+'/CONFIRMED_NONPAYMENT_NONSHIPPED/'+${orderInfo.isParent}+'?viewState='+${viewState}+'&amp;page='+${page}}" th:attr="id=${'link_edit_confirm'},name=${'link_edit_confirm'}"  class="btn default btn-xs purple" ><i class="fa fa-edit"></i>确认</a>
                                <a href="#" th:href="@{'/orderInfo/operator/'+${orderInfo.id}+'/CANCEL_NONPAYMENT_NONSHIPPED/'+${orderInfo.isParent}+'?viewState='+${viewState}+'&amp;page='+${page}}" th:attr="id=${'link_edit_close'},name=${'link_edit_close'}"  class="btn default btn-xs purple" ><i class="fa fa-edit"></i>关闭</a>
                                <a href="#" th:href="@{'/orderInfo/operator/'+${orderInfo.id}+'/CONFIRMED_ACCOUNTPAID_NONSHIPPED/'+${orderInfo.isParent}+'?viewState='+${viewState}+'&amp;page='+${page}}" th:attr="id=${'link_edit_pay'},name=${'link_edit_pay'}"  class="btn default btn-xs purple" ><i class="fa fa-edit"></i>付款</a>
                                <a href="#" th:href="@{'/orderInfo/operator/'+${orderInfo.id}+'/CONFIRMED_NONPAYMENT_SHIPPED/'+${orderInfo.isParent}+'?viewState='+${viewState}+'&amp;page='+${page}+'&amp;shipping=shipping'}" th:attr="id=${'link_edit_shipping'},name=${'link_edit_shipping'}"  class="btn default btn-xs purple" ><i class="fa fa-edit"></i>发货</a>
                            </div>
                            <!--  已关闭 未付款 未发货 -->
                            <div th:if="${orderInfo.orderStatus.toString() == 'CANCEL'}" class="col-md-10 bs-example">
                                <a href="#" th:href="@{'/orderInfo/operator/'+${orderInfo.id}+'/CONFIRMED_NONPAYMENT_NONSHIPPED/'+${orderInfo.isParent}+'?viewState='+${viewState}+'&amp;page='+${page}}" th:attr="id=${'link_edit_confirm'},name=${'link_edit_confirm'}"  class="btn default btn-xs purple" ><i class="fa fa-edit"></i>确认</a>
                            </div>

                            <!--已确认-->
                            <div th:if="${orderInfo.orderStatus.toString() == 'CONFIRMED'}" class="pull-left">
                                <a href="#" th:if="${orderInfo.paymentStatus.toString() == 'NONPAYMENT' &amp;&amp; orderInfo.deliveryStatus.toString() == 'NONSHIPPED'}" th:href="@{'/orderInfo/operator/'+${orderInfo.id}+'/CANCEL_NONPAYMENT_NONSHIPPED/'+${orderInfo.isParent}+'?viewState='+${viewState}+'&amp;page='+${page}}" th:attr="id=${'link_edit_close'},name=${'link_edit_close'}"  class="btn default btn-xs purple" ><i class="fa fa-edit"></i>关闭</a>
                                <a href="#" th:if="${orderInfo.paymentStatus.toString() == 'ACCOUNTPAID'}" th:href="@{'/orderInfo/operator/'+${orderInfo.id}+'/CONFIRMED_NONPAYMENT_'+${orderInfo.deliveryStatus.toString()+'/'}+${orderInfo.isParent}+'?viewState='+${viewState}+'&amp;page='+${page}}" th:attr="id=${'link_edit_nonpay'},name=${'link_edit_nonpay'}"  class="btn default btn-xs purple"><i class="fa fa-edit"></i>未付款</a>
                                <a href="#" th:if="${orderInfo.paymentStatus.toString() != 'ACCOUNTPAID'}" th:href="@{'/orderInfo/operator/'+${orderInfo.id}+'/CONFIRMED_ACCOUNTPAID_'+${orderInfo.deliveryStatus.toString()+'/'}+${orderInfo.isParent}+'?viewState='+${viewState}+'&amp;page='+${page}}" th:attr="id=${'link_edit_nonpay'},name=${'link_edit_nonpay'}"  class="btn default btn-xs purple"><i class="fa fa-edit"></i>付款</a>
                                <a href="#" th:if="${orderInfo.deliveryStatus.toString() != 'SHIPPED'}" th:href="@{'/orderInfo/operator/'+${orderInfo.id}+'/CONFIRMED_'+${orderInfo.paymentStatus.toString()+'_SHIPPED/'}+${orderInfo.isParent}+'?viewState='+${viewState}+'&amp;page='+${page}+'&amp;shipping=shipping'}" th:attr="id=${'link_edit_shipping'},name=${'link_edit_shipping'}"  class="btn default btn-xs purple"><i class="fa fa-edit"></i>发货</a>
                                <a href="#" th:if="${orderInfo.deliveryStatus.toString() == 'SHIPPED'}" th:href="@{'/orderInfo/operator/'+${orderInfo.id}+'/CONFIRMED_'+${orderInfo.paymentStatus.toString()+'_NONSHIPPED/'}+${orderInfo.isParent}+'?viewState='+${viewState}+'&amp;page='+${page}}" th:attr="id=${'link_edit_shipping'},name=${'link_edit_shipping'}"  class="btn default btn-xs purple"><i class="fa fa-edit"></i>未发货</a>
                            </div>
                        </div>
                        <div class="col-md-10" th:if="${!orderInfo.isParent}">
                            <div th:if="${orderInfo.parentOrder.orderStatus.toString() == 'CONFIRMED'}">
                                <div th:if="${orderInfo.deliveryStatus.toString() == 'NONSHIPPED'}" class="col-md-10 bs-example">
                                    <a href="#" th:href="@{'/orderInfo/operator/'+${orderInfo.id}+'/CONFIRMED_'+${orderInfo.parentOrder.paymentStatus.toString()}+'_SHIPPED/'+${orderInfo.isParent}+'?viewState='+${viewState}+'&amp;page='+${page}+'&amp;shipping=shipping'}" th:attr="id=${'link_edit_shipping'},name=${'link_edit_shipping'}"  class="btn default btn-xs purple" ><i class="fa fa-edit"></i>发货</a>
                                </div>
                                <div th:if="${orderInfo.deliveryStatus.toString() == 'SHIPPED'}" class="col-md-10 bs-example">
                                    <a href="#" th:href="@{'/orderInfo/operator/'+${orderInfo.id}+'/CONFIRMED_'+${orderInfo.parentOrder.paymentStatus.toString()}+'_NONSHIPPED/'+${orderInfo.isParent}+'?viewState='+${viewState}+'&amp;page='+${page}}" th:attr="id=${'link_edit_noshipping'},name=${'link_edit_noshipping'}"  class="btn default btn-xs purple" ><i class="fa fa-edit"></i>未发货</a>
                                </div>
                            </div>
                        </div>
						<br/><br/>
					</div>
                    <div class="col-md-12">
                        <div th:replace="orderInfo/operations"></div>
                    </div>
				</div>
			</div>
		</div>
	</div>
</body>
</html>